
{% extends 'sub_page/base.html' %}
{% load custom_tag %}
{% block content %}

<div id="main">
  <div class="row box">
    <div class="col-md-8">
        <h2 class="uptop"><i class="fa fa-briefcase" aria-hidden="true"></i> 文章归档</h2>
        <div class="panel-group" id="accordion">
          {% for year_month_date, articles in archive_articles.items %}
              <div class="panel panel-default">
					<div class="panel-heading">
						 <a class="panel-title" data-toggle="collapse" data-parent="#panel-760793" href="#panel-element-{{ year_month_date | custom_cut:7  }}">{{ year_month_date | custom_cut:7 }}</a>
					</div>
					<div id="panel-element-{{ year_month_date | custom_cut:7  }}" class="panel-collapse collapse in">
						<div class="panel-body">
							{% for article in articles %}
                                {% if forloop.first %}
                                {{ year_month_date| custom_cut2 }}<br/>
                                {% endif %}
                                <a href="{% url 'blog' article.id %}">{{ article.title }}</a><br/>
                            {% endfor %}
						</div>
					</div>
				</div>
          {% endfor %}
        </div>
    </div>
    {% include 'sub_page/right.html' %}
  </div>
</div>

{% endblock %}